package com.central.task.mapper;

import com.central.task.model.TaskDefinedLog;
import com.central.db.mapper.SuperMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Tindy
 * @date 2021/11/29
 * @describe
 */
@Mapper
public interface TaskDefinedLogMapper extends SuperMapper<TaskDefinedLog> {
    @Select("select max(version) from task_defined_log where task_defined_id=#{taskDefinedId}")
    Integer queryMaxVersionForDefined(@Param("taskDefinedId") Long taskDefinedId);

    List<TaskDefinedLog> findTaskLogs(@Param("taskDefinedId") Long taskDefinedId,@Param("taskDefinedLogId") Long taskDefinedLogId);
}
